<?php foreach($rs1 as $r)?>
<p>&nbsp;</p>
<span id="wiatLogin"></span>
<div align="center">
  <h1>ตารางกรอกข้อมูลคุณภาพ MasterReel</h1>
</div>
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="5" class="font">
  <tr>
  <td width="60%" valign=top >
	<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" class="font">
  <tr>
    <td width="8%"  >ประเภท</td>
    <td width="20%"  > :&nbsp;&nbsp;&nbsp;<?php echo $r['type_product']; ?></td>
    <td width="8%"  >Reel No.</td>
    <td width="20%"  > :&nbsp;&nbsp;&nbsp;<?php echo $r['reel_no']; ?></td>
    <td width="8%"  >Date</td>
    <td width="20%"  > :&nbsp;&nbsp;&nbsp;<?php echo $r['key_date']; ?></td>
  </tr>
  <tr>
    <td  >Type</td>
    <td  > :&nbsp;&nbsp;&nbsp;<?php echo $r['type_of']; ?></td>
    <td  >Grade</td>
    <td  > :&nbsp;&nbsp;&nbsp;<?php echo $r['grade']; ?></td>
    <td  >Shift</td>
    <td  > :&nbsp;&nbsp;&nbsp;<?php echo $r['shift']; ?></td>
  </tr>
  <tr>
    <td  >Gram </td>
    <td  > :&nbsp;&nbsp;&nbsp;<?php echo $r['gram']; ?></td>
    <td  >Problem</td>
    <td  > :&nbsp;&nbsp;&nbsp;<?php echo $r['comment']; ?></td>
    <td  >Time</td>
    <td  > :&nbsp;&nbsp;&nbsp;<?php echo $r['modify_date']; ?></td>
  </tr>
   <tr>
    <td   colspan=6 align=center>
    
    <?php if($r["status"] == 1)
    { echo "<h2>Status :: <font color=green>ผ่านการทดสอบ</font></h2>";} 
    else 
    {
    	echo "<h2>Status :: <font color=red>ไม่ผ่านการทดสอบ</font></h2>";
      
     } 
    ?>
    
    </td>
    
  </tr>
</table>
  </td>
  <td valign=top>
  <table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" class="font">
  <tr>
   <b>Work Flow</b> 	
  </td>
  </tr>
  <tr>
	  <td>  flow no  </td> <td> Approve By </td> <td> Date Time</td> <td> Flow Status </td>
  </tr>
  <!--  ตรวจสอบ Workflow -->
  <tr>
	  <td> 1  </td> <td> <?=$this->session->userdata('fullname')?></td> <td>  </td> <td><b>Completed</b>  </td>
  </tr>
  </table>
  
  </td>
  </tr></table>
<br />
<table width="99%" align="center" class="font">
  <tr>
    <td><table id="grid">
        <thead>
          <tr>
            <th data-field="rank">Properties Item</th>
            <th data-field="rating">Value</th>
            <th data-field="title">Unit</th>
            <th data-field="year">Properties Item</th>
            <th data-field="dse">Value</th>
            <th data-field="asa">
            Unit</th>
            <th data-field="aa">Properties Item</th>
            <th data-field="bb">Value</th>
            <th data-field="cc">            Unit</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>น้ำหนักม้วน</td>
            <td>
			  <?php 
			  foreach($rs2 as $r)
			  {
				  if($r['data_name']== 'masterMR10')
				  {
				  	if($r['status']== '1')
						{
							echo $r['data_value'];
						}
					else
						{
			echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
				  }
			  }
			  ?>        
            </td>
            <td>Tons ตัน</td>
            <td>Water Absorp TS</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR32')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(g/m<sup>2</sup>)</td>
            <td>Internal Bonding</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR53')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(J/m<sup>2</sup>)</td>
          </tr>
          <tr>
            <td>Basis Weight</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR11')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(g/m<sup>2</sup>)</td>
            <td>Water Absorp BS</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR33')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(g/m<sup>2</sup>)</td>
            <td>Friction static</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR54')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td></td>
          </tr>
          <tr>
            <td>Thickness</td>
            <td><?php 
			  foreach($rs2 as $r)
			  {
				  if($r['data_name']== 'masterMR12')
				  {
				  	if($r['status']== '1')
						{
							echo $r['data_value'];
						}
					else
						{
			echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
				  }
			  }
			  ?>  </td>
            <td>(mm)</td>
            <td>PPF Value</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR34')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(PPF)</td>
            <td>Friction kinetic</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR55')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td></td>
          </tr>
          <tr>
            <td>Density</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR13')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(g/cm<sup>3</sup>)</td>
            <td>Filler</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR35')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(%)</td>
            <td>Raggesness</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR56')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>Plattern No.</td>
          </tr>
          <tr>
            <td>Bulk</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR14')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(cm<sup>3</sup>/g)</td>
            <td>Moisture</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR36')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(%)</td>
            <td>Black density</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR57')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>Plattern No.</td>
          </tr>
          <tr>
            <td>Roughness (TS)</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR15')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>ml/min</td>
            <td>CIE Whiteness</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR37')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(%)</td>
            <td>Gainniness</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR58')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>Plattern No.</td>
          </tr>
          <tr>
            <td>Roughness (BS)</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR16')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>ml/min</td>
            <td>ISO Brightness</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR38')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(%)</td>
            <td>Flat Curl Before</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR59')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>mm</td>
          </tr>
          <tr>
            <td>Porosity</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR17')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(s./100)</td>
            <td>Opacity</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR39')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(m<sup>2</sup>/kg)</td>
            <td>Flat Curl After F</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR60')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>mm</td>
          </tr>
          <tr>
            <td>Air Permeability</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR18')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>ml/min</td>
            <td>Scatter Co.</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR40')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(m<sup>2</sup>/kg)</td>
            <td>Flat Curl After W</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR61')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>mm</td>
          </tr>
          <tr>
            <td>Tensile Strenght MD</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR19')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(kN/m)</td>
            <td>Absorb Co.</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR41')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>&nbsp;</td>
            <td>Flat Curl After F-W</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR62')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>Double mm</td>
          </tr>
          <tr>
            <td>Tensile Strenght CD</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR20')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(kN/m)</td>
            <td>L*</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR42')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td></td>
            <td>Flat Curl After W-F</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR63')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>Double mm</td>
          </tr>
          <tr>
            <td>Tensile Stretch MD</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR21')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(%)</td>
            <td>a*</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR43')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td></td>
            <td>Hanging Curl Before </td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR64')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>mm</td>
          </tr>
          <tr>
            <td>Tensile Stretch CD</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR22')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(%)</td>
            <td>b*</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR44')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td></td>
            <td>Hanging Curl After F</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR65')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>mm</td>
          </tr>
          <tr>
            <td>Tensile Index</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR23')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>Nm/g</td>
            <td>Dirt</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR45')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(ppm)</td>
            <td>Hanging Curl After W</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR66')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>mm</td>
          </tr>
          <tr>
            <td>Tear MD</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR24')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(mN)</td>
            <td>Pen Writing Top</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR46')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>Plattern No.</td>
            <td>Hanging Curl After F-W</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR67')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>Double mm</td>
          </tr>
          <tr>
            <td>Tear CD</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR25')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(mN)</td>
            <td>Pen Writing Bottom</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR47')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>Plattern No.</td>
            <td>Hanging Curl After W-F</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR68')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>Double mm</td>
          </tr>
          <tr>
            <td>Bending Stiffness MD</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR26')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(mN)</td>
            <td>Stockigt Top</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR48')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>Second.</td>
            <td>2 Sigma Basis Weight</td>
            <td>&nbsp;</td>
            <td></td>
          </tr>
          <tr>
            <td>Bending Stiffness CD</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR27')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(mN)</td>
            <td>Stockigt Bottom</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR49')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>Second.</td>
            <td>2 Sigma Thicknes</td>
            <td>&nbsp;</td>
            <td></td>
          </tr>
          <tr>
            <td>Bursting Strength</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR28')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(kPa)</td>
            <td>TSAmd</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR50')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td></td>
            <td>2 Sigma DE</td>
            <td>&nbsp;</td>
            <td></td>
          </tr>
          <tr>
            <td>Surface Strength TS</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR29')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(No.A)</td>
            <td>TSImd</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR51')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td></td>
            <td>2 Sigma Filler</td>
            <td>&nbsp;</td>
            <td></td>
          </tr>
          <tr>
            <td>Surface Strength BS</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR30')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(No.A)</td>
            <td>TSIcd</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR52')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td></td>
            <td>2 Sigma Moisture</td>
            <td>&nbsp;</td>
            <td></td>
          </tr>
          <tr>
            <td>Suf. Electric</td>
            <td><?php
			foreach($rs2 as $r)
			  {
		 	 		if($r['data_name']=='masterMR31')
		 	 		{
		 	 			if($r['status']== '1')
						{
							echo $r['data_value'];
						}
						else
						{
				echo "<span class='red'>"."<strong>".$r['data_value']."</strong>"."</span>";
						}
			 		}
				}      		 
			?></td>
            <td>(Ohm)</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
        </tbody>
      </table></td>
  </tr>
</table>
 <style scoped="scoped">
   .info {
                    display: block;
                    line-height: 22px;
                    padding: 0 5px 5px 0;
					color: #36558e;
                }
  </style>
<!--scrip list select--> 
<script>
                $(document).ready(function() {
                    var viewModel = {
                        chosenTicket: ko.observable(),
                        resetTicket: function() { this.chosenTicket(null) },
                    };
                    $("#ticket1").kendoDropDownList().trigger("change");
                    $("#ticket2").kendoDropDownList().trigger("change");
                    $("#ticket3").kendoDropDownList().trigger("change");
                    $("#ticket4").kendoDropDownList().trigger("change");
                    $("#ticket5").kendoDropDownList().trigger("change");
                    var today = new Date(),
                        birthdays = [
                           +new Date(today.getFullYear(), today.getMonth(), 11),
                           +new Date(today.getFullYear(), today.getMonth() + 1, 6),
                           +new Date(today.getFullYear(), today.getMonth() + 1, 27),
                           +new Date(today.getFullYear(), today.getMonth() - 1, 3),
                           +new Date(today.getFullYear(), today.getMonth() - 2, 22)
                        ];
                    $("#grid").kendoGrid({
						columns: [
						{ field: "rank", width: "40px" },
						{ field: "rating", width: "15px" },
						{ field: "title",  width: "20px" },
						{ field: "year", width: "40px" },
						{ field: "dse", width: "15px" },
						{ field: "asa", width: "20px" },
						{ field: "aa", width: "40px" },
						{ field: "bb", width: "15px" },
						{ field: "cc", width: "20px" }

						],
                        //height: 1000,
						//pageable: true,
						dataSource: {
						//pageSize: 12
						} 
                    });
                });
            </script> 